<template>
    <el-dialog title="详情" :visible.sync="newsVisible" min-width="650px" :append-to-body="true" :modal="false"
        @close="dialogClose">
        <div class="news">
            <p class="news-title">{{newForm.title}}</p>
            <el-row class="news-details">
                <el-col :span="7" class="word"><span>发表人：{{newForm.name}}</span></el-col>
                <el-col :span="7" class="word"><span>咨询分类：{{newForm.classify}}</span></el-col>
                <el-col :span="10" class="word"><span>发布时间：{{newForm.time}}</span></el-col>
            </el-row>
            <div v-html="newForm.content" class="news_content"></div>
        </div>
    </el-dialog>
</template>
<script>
    export default {
        props: {
            dialogVisible: Boolean,
            DialogNewForm: Object
        },
        data() {
            return {
                newsVisible: false,
                newForm: {},
            }
        },
        watch: {
            dialogVisible(newval, oldval) {
                this.newsVisible = newval
                
            },
            DialogNewForm(newval, oldval) {
                this.newForm = newval;
            }
        },
        methods: {
            dialogClose() {
                this.$emit('update:dialogVisible', false)
            },
        },
        created(){
        }
    }
</script>
<style scoped lang="scss">
    .news {
        .news-title {
            font-size: 16px;
            color: #4d4d4d;
        }

        .news-details {
            .word {
                font-size: 14px;
                color: #999999;
            }
        }

        .news_content {
            height: 300px;
            overflow-y: scroll !important;
            margin-top: 20px;
            overflow-x: hidden
        }
    }
</style>